<?php
defined('IN_IA') or exit('Access Denied');
global $_GPC, $_W;
$aouthkey = $_GPC['aouthkey'];
$itemid = $_GPC['itemid'];
$itemurl = $_GPC['itemurl'];
$itemsurl = $_GPC['itemsurl'];
$itemyhj_url = $_GPC['itemyhj_url'];
$isdx = $_GPC['isdx'];
$tktype = $_GPC['tktype'];
$setting = $this->baseset($_W['uniacid']);
$nbkey = $setting['nbkey'];
if ($aouthkey == $nbkey) {
	if (!empty($itemid)) {
	} else {
		exit(json_encode(array('isok' => 'noiteminfo')));
	}
	$list = pdo_fetch("SELECT id,itemid,status FROM " . tablename($this->tableitemall) . " WHERE uniacid = '{$_W['uniacid']}' AND itemid = '{$itemid}'");
	if ($list) {
		$data = array();
		if (!empty($itemurl)) {
			$data['itemurl'] = $itemurl;
		}
		if (!empty($itemsurl)) {
			$data['itemsurl'] = $itemsurl;
		}
		if (!empty($itemyhj_url)) {
			$data['itemyhj_url'] = $itemyhj_url;
		}
		if ($isdx) {
			$data['isdx'] = $isdx;
		}
		$data['status'] = $list['status'];
		pdo_update($this->tableitemall, $data, array('id' => $list['id']));
		exit(json_encode(array('isok' => 1, 'iteminfo' => $list)));
	} else {
		exit(json_encode(array('isok' => 'noiteminfo')));
	}
} else {
	exit(json_encode(array('isok' => 'aouthkey error!')));
}